package com.lonely.purchase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lonely.purchase.domain.dto.remainingmaterialinventory.QueryRemainingMaterialInventoryPageDTO;
import com.lonely.purchase.domain.dto.remainingmaterialinventory.QueryTypeInMaterialInventoryPageDTO;
import com.lonely.purchase.domain.entity.SysRemainingMaterialInventory;
import com.lonely.purchase.domain.vo.remainingmaterialinventory.QueryRemainingMaterialInventoryPageVO;
import com.lonely.purchase.domain.vo.remainingmaterialinventory.QueryTypeInInventoryPageVO;
import com.lonely.purchase.domain.vo.remainingmaterialinventory.RemainingMaterialInventoryDetailVO;
import org.apache.ibatis.annotations.Param;

/**
 * @author : 黄志标
 * @date: 2025/7/25 16:17
 * @description: 余料库存mapper
 */
public interface SysRemainingMaterialInventoryMapper extends BaseMapper<SysRemainingMaterialInventory> {

    /**
     * 分页查询余料库存
     *
     * @param page
     * @param queryDto
     * @return
     */
    Page<QueryRemainingMaterialInventoryPageVO> page(Page<QueryRemainingMaterialInventoryPageVO> page, @Param("query") QueryRemainingMaterialInventoryPageDTO queryDto);

    /**
     * 根据id查询余料库存详情
     *
     * @param id
     * @return
     */
    RemainingMaterialInventoryDetailVO getDetailById(@Param("id") Long id);


    /**
     * 录入库存时物料库存分页列表
     * @param page
     * @param pageDto
     * @return
     */
    Page<QueryTypeInInventoryPageVO> queryTypeInMaterialInventoryPage(Page<RemainingMaterialInventoryDetailVO> page, @Param("query") QueryTypeInMaterialInventoryPageDTO pageDto);
}
